//
//  UIColor+extension.swift
//  SinaMicroblog
//
//  Created by 原鹏飞 on 2017/4/5.
//  Copyright © 2017年 YuanPengFei. All rights reserved.
//

import UIKit

extension UIColor {
    class func rgbColor(r: CGFloat, g: CGFloat, b: CGFloat) -> UIColor {
        let red = r / 255.0
        let green = g / 255.0
        let blue = b / 255.0
        
        //括号调用的是initWith方法: public init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)
        return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
    }
}
